let mongoose = require('mongoose');

mongoose.set('strictQuery',false)

mongoose.connect('mongodb://root:admin@101.37.175.34:27017/project?authSource=admin')

const link = mongoose.connection;

link.on('open',()=>{
    console.log('数据库连接成功');
})

link.on('err',(err)=>{
    console.log('数据库连接失败',err);
})

module.exports = mongoose;